export default {
  route: '/project/wiszc/custom/demo',
  title: 'dem',
  local: {},
  remote: {},
  elementConfig: {
    type: 'HtGuiContainer',
    props: {
      style: {
        padding: '8px',
      },
    },
    children: [
      {
        type: 'HtCard',
        props: {
          title: '基础详情页',
          extra: [
            {
              type: 'HtButton',
              props: {
                type: 'link',
                text: '跳转页面',
                href: '/',
                useH5Href: false,
              },
              children: [],
            },
          ],
          type: 'HtCard',
          bordered: true,
        },
        children: [
          {
            type: 'HtForm',
            props: {
              title: '退款申请',
              isCard: true,
              url: '/mock/api/update',
              fields: [
                {
                  'v-if': '<%:= true %>',
                  field: 'a',
                  title: '取货单号',
                  tooltip: '',
                  type: 'Text',
                  defaultValue: '1000000000',
                },
                {
                  'v-if': '<%:= true %>',
                  field: 'b',
                  title: '状态',
                  tooltip: '',
                  type: 'Text',
                  defaultValue: '已取货',
                },
                {
                  'v-if': '<%:= true %>',
                  field: 'c',
                  title: '销售单号',
                  tooltip: '',
                  type: 'Text',
                  defaultValue: '1234123421',
                },
                {
                  'v-if': '<%:= true %>',
                  field: 'd',
                  title: '子订单',
                  tooltip: '',
                  type: 'Text',
                  defaultValue: '3214321432',
                },
              ],
              alias: '$$HtForm1',
              labelCol: {
                span: 6,
                offset: 0,
              },
              wrapperCol: {
                span: 16,
                offset: 0,
              },
              method: 'post',
              cols: 3,
              responseAlias: '$$HtFormResponse',
              buttons: [],
              transform: '<%:= data => ({ ...data }) %>',
              type: 'HtForm',
            },
          },
          {
            type: 'HtForm',
            props: {
              title: '用户信息',
              isCard: true,
              url: '/mock/demo/update',
              fields: [
                {
                  'v-if': '<%:= true %>',
                  field: 'e',
                  title: '用户姓名',
                  tooltip: '',
                  type: 'Text',
                  defaultValue: '付小小',
                },
                {
                  'v-if': '<%:= true %>',
                  field: 'f',
                  title: '联系电话',
                  tooltip: '',
                  type: 'Text',
                  defaultValue: '18100000000',
                },
                {
                  'v-if': '<%:= true %>',
                  field: 'g',
                  title: '常用快递',
                  tooltip: '',
                  type: 'Text',
                  defaultValue: '菜鸟仓储',
                },
                {
                  'v-if': '<%:= true %>',
                  field: 'h',
                  title: '取货地址',
                  tooltip: '',
                  type: 'Text',
                  defaultValue: '浙江省杭州市西湖区万塘路18号',
                },
              ],
              alias: '$$HtForm1',
              labelCol: {
                span: 6,
                offset: 0,
              },
              wrapperCol: {
                span: 16,
                offset: 0,
              },
              method: 'post',
              cols: 3,
              responseAlias: '$$HtFormResponse',
              buttons: [],
              transform: '<%:= data => ({ ...data }) %>',
              type: 'HtForm',
            },
          },
          {
            type: 'HtList',
            props: {
              url: '/mock/api/list',
              pageSize: 2,
              columns: [
                {
                  title: '商品编号',
                  dataIndex: 'id',
                  width: 50,
                  tooltip: '你好',
                  type: 'HtList.column',
                  renderType: 'default',
                  showOverflowTooltip: false,
                  sort: false,
                  filterColumns: false,
                  'v-if': '<%:= row => true %>',
                },
                {
                  title: '商品图片',
                  dataIndex: 'imageUrl',
                  width: 60,
                  renderType: 'img',
                  sort: true,
                  type: 'HtList.column',
                  tooltip: '',
                  showOverflowTooltip: false,
                  filterColumns: false,
                  'v-if': '<%:= row => true %>',
                },
                {
                  title: '商品链接',
                  dataIndex: 'preview',
                  width: 80,
                  renderType: 'a',
                  type: 'HtList.column',
                  text: '预览',
                  tooltip: '',
                  showOverflowTooltip: false,
                  sort: false,
                  filterColumns: false,
                  'v-if': '<%:= row => true %>',
                },
                {
                  title: '标签',
                  dataIndex: 'tags',
                  renderType: 'tag',
                  width: 100,
                  isWrapper: true,
                },
                {
                  title: '状态',
                  dataIndex: 'switch',
                  renderType: 'switch',
                  url: '/mock/api/update',
                  width: 100,
                  type: 'HtList.column',
                  checkedChildren: '开',
                  unCheckedChildren: '关',
                  method: 'post',
                  transform: '<%:=  row => ({ ...row }) %>',
                  tooltip: '',
                  showOverflowTooltip: false,
                  sort: false,
                  filterColumns: false,
                  'v-if': '<%:= row => true %>',
                },
              ],
              cardType: 'default',
              type: 'HtList',
              uniqueKey: 'id',
              cols: 3,
              isAutoSubmit: true,
              columnsSetting: false,
              isPagination: true,
              pageSizeOptions: ['10', '20', '50', '100', '500', '1000'],
              method: 'get',
              alias: '$$HtList',
              buttons: ['back', 'submit'],
              transform: '<%:= data => ({ ...data }) %>',
              fieldMap: {
                pageNumKey: 'pageNum',
                pageSizeKey: 'pageSize',
                listKey: 'list',
                totalKey: 'total',
              },
              title: '退货商品',
            },
            children: [],
          },
        ],
      },
    ],
  },
}
